package com.sxbbc.common.core.entity.jz;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 用户金额明细表
 * </p>
 *
 * @author leehao
 * @since 2019-05-07
 */
@TableName("c_money_detail")
public class CMoneyDetail extends Model<CMoneyDetail> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer cid;

    /**
     * 关联单号
     */
    private String payCode;

    /**
     * 操作类型
     */
    private Integer typeId;

    /**
     * 1收入 0支出
     */
    private Integer isout;

    /**
     * 上一次金额
     */
    private BigDecimal original;

    /**
     * 本次操作金额
     */
    private BigDecimal cost;

    /**
     * 最后结余
     */
    private BigDecimal last;

    private Date createTime;

    /**
     * 触发人id 只表示用户id
     */
    private Integer targetid;

    /**
     * 描述
     */
    private String remark;

    @TableField(exist = false)
    private String phone;

    @TableField(exist = false)
    private String typeName;

    /**
     * 查询条件 明细开始时间
     */
    @TableField(exist = false)
    private String start;

    /**
     * 查询条件 明细结束时间
     */
    @TableField(exist = false)
    private String end;

    /**
     * 查询时间
     */
    @TableField(exist = false)
    private String queryTime;

    /**
     * 是否提现 0 否  1 提现类型
     */
    @TableField(exist = false)
    private Integer cash = 0;

    /**
     * 提现状态
     */
    @TableField(exist = false)
    private String cashStatusName;

    /**
     * 支付方式
     */
    @TableField(exist = false)
    private Integer payType;

    public String getCashStatusName() {
        return cashStatusName;
    }

    public void setCashStatusName(String cashStatusName) {
        this.cashStatusName = cashStatusName;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public CMoneyDetail() {
    }

    public CMoneyDetail(Integer cid, String payCode, Integer typeId, Integer isout,
                        BigDecimal original, BigDecimal cost, BigDecimal last, String remark) {
        this.cid = cid;
        this.payCode = payCode;
        this.typeId = typeId;
        this.isout = isout;
        this.original = original;
        this.cost = cost;
        this.last = last;
        this.remark = remark;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getPayCode() {
        return payCode;
    }

    public void setPayCode(String payCode) {
        this.payCode = payCode;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Integer getIsout() {
        return isout;
    }

    public void setIsout(Integer isout) {
        this.isout = isout;
    }

    public BigDecimal getOriginal() {
        return original;
    }

    public void setOriginal(BigDecimal original) {
        this.original = original;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    public BigDecimal getLast() {
        return last;
    }

    public void setLast(BigDecimal last) {
        this.last = last;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getTargetid() {
        return targetid;
    }

    public void setTargetid(Integer targetid) {
        this.targetid = targetid;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public String getQueryTime() {
        return queryTime;
    }

    public void setQueryTime(String queryTime) {
        this.queryTime = queryTime;
    }

    public Integer getCash() {
        return cash;
    }

    public void setCash(Integer cash) {
        this.cash = cash;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CMoneyDetail{" +
                "id=" + id +
                ", cid=" + cid +
                ", payCode=" + payCode +
                ", typeId=" + typeId +
                ", isout=" + isout +
                ", original=" + original +
                ", cost=" + cost +
                ", last=" + last +
                ", createTime=" + createTime +
                ", targetid=" + targetid +
                ", remark=" + remark +
                "}";
    }
}
